package day1_1.Company1;

import day1_1.Company1.Company;

import java.util.Scanner;

public class CompanyTest {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        Company x=new Company();
        while (true){
            System.out.println("***选择功能***");
            int a=in.nextInt();
            if (a==1){
                System.out.println("*****新员工*****");
                System.out.print("输入您的名字:");
                String q=in.next();
                System.out.print("输入您的年龄:");
                int q1=in.nextInt();
                System.out.print("输入您的性别:");
                String q2=in.next();
                System.out.print("输入职位:");
                String q3=in.next();
                System.out.print("工资:");
                int q4=in.nextInt();
                System.out.print("输入工号:");
                String q5=in.next();
                if (x.tianjia(q,q1,q2,q3,q4,q5)){
                    System.out.println("添加成功");
                }else {
                    System.out.println("添加失败,有重复");
                }
            }else if (a==2){
                x.chakan();
            }else if (a==3){
                System.out.println("***辞退***");
                System.out.print("输入姓名:");
                String w=in.next();
                if (x.citui(w)){
                    System.out.println("OK");
                }else {
                    System.out.println("查无此人");
                }
            }else if (a==4){
                System.out.println("人数");
                x.a();
            }else if (a==5){
                System.out.println("***工资最高***");
                x.b();

            }
        }
    }
}
